/**
 * HRDC销售路由
 */


import Main from '@/components/main'
import parentView from '@/components/parent-view'

const hrdcSalesCenterRouter = {
  path: '/hrdc-sales-center',
  name: 'hrdc-sales-center',
  meta: {
    keepAlive: true,
    icon: '_HRDCkehuxiaoshouzhongxin',
    showAlways: true,
    access: ['hrdc_sales'],
    title: '客户销售中心'
  },
  component: Main,
  children: [
    {
      path: 'hrdc-coustomer',
      name: 'hrdc-coustomer',
      meta: {
        keepAlive: true,
        showAlways: true,
        access: ['hrdc_sales_customers'],
        title: '客户管理'
      },
      component: parentView,
      children: [
        {
          path: 'h-c-public',
          name: 'h-c-public',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_public'],
            title: '公海客户'
          },
          component: () => import('@/view/oti-center/coustomer/public/index.vue')
        },
        {
          path: 'h-c-private',
          name: 'h-c-private',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_private'],
            title: '私有客户'
          },
          component: () => import('@/view/oti-center/coustomer/private/index.vue')
        },
        {
          path: 'h-c-potential',
          name: 'h-c-potential',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_potential'],
            title: '潜在客户'
          },
          component: () => import('@/view/oti-center/coustomer/potential/index.vue')
        },
        {
          path: 'h-c-detail',
          name: 'h-c-detail',
          meta: {
            keepAlive: true,
            // access: ['oti'],
            notCache: true,
            hideInMenu: true,
            title: '客户详情'
          },
          component: () => import('@/view/oti-center/HRDC-common/detail/detail.vue')
        }
      ]
    },
    {
      path: 'hrdc-sales',
      name: 'hrdc-sales',
      meta: {
        keepAlive: true,
        showAlways: true,
        access: ['hrdc_sales_projects'],
        title: '销售管理'
      },
      component: parentView,
      children: [
        {
          path: 'hrdc-demand-A',
          name: 'hrdc-demand-A',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_a'],
            // notCache: false,
            title: '明确需求'
          },
          component: () => import('@/view/oti-center/sales/demand-A/index.vue')
        },
        {
          path: 'hrdc-demand-B',
          name: 'hrdc-demand-B',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_b'],
            title: '共识方案'
          },
          component: () => import('@/view/oti-center/sales/demand-B/index.vue')
        },
        {
          path: 'hrdc-demand-C',
          name: 'hrdc-demand-C',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_c'],
            title: '商务机会'
          },
          component: () => import('@/view/oti-center/sales/demand-C/index.vue')
        },
        {
          path: 'hrdc-demand-D',
          name: 'hrdc-demand-D',
          meta: {
            keepAlive: true,
            access: ['hrdc_sales_d'],
            title: '合作签约'
          },
          component: () => import('@/view/oti-center/sales/demand-D/index.vue')
        },
        {
          path: 'project-delivery',
          name: 'project-delivery',
          meta: {
            keepAlive: true,
            access: ['ProductDeliveryList'],
            title: '项目交付'
          },
          component: () => import('@/view/oti-center/sales/project-delivery/index.vue')
        }
      ]
    },
    {
      path: 'hrdc-sales-basedata',
      name: 'hrdc-sales-basedata',
      meta: {
        keepAlive: true,
        access: ['SalesCustomerConfig'],
        title: '(测)销售基础数据管理'
      },
      component: () => import('@/view/oti-center/salesBaseData/salesBaseData.vue')
    },
    {
      path: 'hrdc-clues-basedata',
      name: 'hrdc-clues-basedata',
      meta: {
        keepAlive: true,
        access: ['SalesCustomerConfig'],
        title: '(新)线索开发看板'
      },
      component: () => import('@/view/oti-center/sales/cluesData/index.vue')
    },
    {
      path: 'hrdc-customer-basedata',
      name: 'hrdc-customer-basedata',
      meta: {
        keepAlive: true,
        access: ['SalesCustomerConfig'],
        title: '(新)客户管理看板'
      },
      component: () => import('@/view/oti-center/sales/cluesData/index.vue')
    },
    {
      path: 'hrdc-dataStatistical',
      name: 'hrdc-dataStatistical',
      meta: {
        keepAlive: true,
        access: ['hrdc_sales_stats'],
        title: '数据统计'
      },
      component: () => import('@/view/oti-center/dailyManage/dataStatistical.vue')
    },
    {
      path: 'SaleTeamUserKanbanStat',
      name: 'SaleTeamUserKanbanStat',
      meta: {
        keepAlive: true,
        access: ['SaleTeamUserKanbanStat'],
        title: '销售看板'
      },
      component: () => import('@/view/oti-center/sales/data-kanban/total/index.vue')
    },
    {
      path: 'SaleTeamKanbanStat',
      name: 'SaleTeamKanbanStat',
      meta: {
        keepAlive: false,
        access: ['SaleTeamKanbanStat'],
        title: '销售业绩统计'
      },
      component: () => import('@/view/oti-center/sales/data-kanban/achievement/index.vue')
    },
    {
      path: 'SaleTeam',
      name: 'SaleTeam',
      meta: {
        keepAlive: true,
        access: ['SaleTeam'],
        title: '团队管理'
      },
      component: () => import('@/view/oti-center/sales/saleTeam/index.vue')
    },
    {
      path: 'SaleTeamTarget',
      name: 'SaleTeamTarget',
      meta: {
        keepAlive: true,
        access: ['SaleTeamTarget'],
        title: '团队目标管理'
      },
      component: () => import('@/view/oti-center/sales/saleTeamTarget/index.vue')
    },
    {
      path: 'SaleTeamUserTarget',
      name: 'SaleTeamUserTarget',
      meta: {
        keepAlive: true,
        access: ['SaleTeamUserTarget'],
        title: '销售目标管理'
      },
      component: () => import('@/view/oti-center/sales/saleTeamUserTarget/index.vue')
    }
  ]
}

export default hrdcSalesCenterRouter;